<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>问题列表</title>
	{% include "../header.html" %}
</head>

<body>
	{% include "../nav.html" %}
	<div class="row" style="margin: 3% 8% 5% 8%">
		<div class="col-md-8">
			<div class="card">
				<div class="card-body">
					{% if problems_list.object_list %}
					<h4>问题列表</h4>
					<table class="table table-hover">
						<tr>
							<th>ID</th>
							<th>标题</th>
						</tr>
						{% for problem in problems_list.object_list %}
						<tr>
							<td>{{ problem.id }}</td>
							<td><a href="{% url 'vt1:problemInfo' problem.id %}">{{ problem.problem_title }}</a></td>
						</tr>
						{% endfor %}
					</table>
					{% else %}
					<p>啊哈，一个问题也没有</p>
					{% endif %}
					<ul class="pagination">
						<li class="page-item"><a class="page-link" href="/problems/page/1">&lt;&lt;</a>
						</li>
						<li class='active page-item'>
							<a class='page-link' href='/problems/page/1'>{{ problems_list.number }}</a>
						</li>
						<li class="page-item"><a class="page-link" href="/problems/page/5">&gt;&gt;</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	{% include "../footer.html" %}
</body>

</html>